The invention relates to an image converting method and an image converting apparatus for converting image data influenced by a colored light source upon photographing into image data obtained under an ideal white light source.
When an object to be photographed is photographed by using, for example, a fluorescent lamp as a light source, image data in which the object is bluish is obtained. An image converting method called a gray world (hereinafter, simply referred to as a gray world) is used to eliminate such an influence of the colored light source.
According to the gray world, it is presumed that a color obtained by averaging chromaticity coordinate values of respective pixels of the image data becomes chromaticity coordinate values showing achromatic gray, and by converting the image data by using such chromaticity coordinate values showing the achromatic gray, that is, by executing what is called a chromatic adaptation conversion, bluishness is eliminated. That is, the gray world is a method of obtaining the same image data as that photographed under an ideal white light source in which spectra are uniformed as shown in FIG. 6. A technique using the gray world has been disclosed in a patent literature 1 (JP-A-2002-232901).
According to the conventional gray world, the conversion is performed to the image data by using the chromaticity coordinate values obtained by averaging the chromaticity coordinate values of the respective pixels. That is, the averaging of the chromaticity coordinate values of the respective pixels is performed to obtain average values of the chromaticity coordinate values which take into consideration of a frequency of occurrence of the color of each pixel. Therefore, average values of chromaticity coordinate values of image data obtained by photographing, for example, a small white sandy beach, a blue sea, and a blue sky, as objects, by using a digital camera or the like are not chromaticity coordinate values showing the achromatic gray but chromaticity coordinate values which are deviated to blue and based on blue. Therefore, even if the conversion is executed by using those chromaticity coordinate values, the image data cannot be properly converted into the image data which is obtained under the ideal white light source.